package com.xueyi.workflow.service.impl;

import com.xueyi.common.web.entity.service.impl.BaseServiceImpl;
import com.xueyi.workflow.correlate.NoneCorrelate;
import com.xueyi.workflow.domain.query.FormDefineQuery;
import com.xueyi.workflow.domain.dto.FormDefineDto;
import com.xueyi.workflow.domain.entity.FormDefine;
import com.xueyi.workflow.manager.FormDefineManager;
import com.xueyi.workflow.service.FormDefineService;
import com.xueyi.common.core.web.result.AjaxResult;
import org.springframework.stereotype.Service;

@Service
public class FormDefineServiceImpl extends BaseServiceImpl<FormDefineQuery, FormDefineDto, NoneCorrelate, FormDefineManager> implements FormDefineService {

    @Override
    public AjaxResult publishPublic(Long id) {
        FormDefineDto entity = selectById(id);
        if (entity == null) {
            return AjaxResult.error("表单不存在");
        }
        entity.setTenantId(0L);
        update(entity);
        return AjaxResult.success();
    }
} 